<template>
  <div class="dx-menu-lists">
    <div class="menu-lists-header" />
    <div class="menu-lists-body">
      <router-link
        v-for="item in dataList"
        :key="item.id"
        tag="div"
        :to="{ name: 'DataDisplay', query: { id: item.id } }"
      >
        <div class="tools-icon" :style="{ backgroundColor: item.bc }">
          <i :class="item.icon" />
        </div>
        <span>{{ item.name }}</span>
      </router-link>
    </div>
  </div>
</template>

<script>
export default {
  name: 'MenuLists',
  data() {
    return {
      dataList: [
        { id: 1, name: '数据模块', icon: 'dx-shuju', bc: '#00688B' },
        { id: 2, name: '数据模块', icon: 'dx-shuju1', bc: '#218868' },
        { id: 3, name: '数据模块', icon: 'dx-shuju2', bc: '#EEB422' },
        { id: 4, name: '数据模块', icon: 'dx--', bc: '#4A708B' },
        { id: 5, name: '数据模块', icon: 'dx-shuju4', bc: '#8B008B' },
        { id: 6, name: '数据模块', icon: 'dx-shujumenhu-logo3', bc: '#8B5A2B' },
        { id: 7, name: '数据模块', icon: 'dx-shujuyuan', bc: '#8E388E' },
        { id: 8, name: '数据模块', icon: 'dx-shuju5', bc: '#B03060' },
        { id: 9, name: '数据模块', icon: 'dx-shuju6', bc: '#CD3278' }
      ]
    }
  }
}
</script>

<style lang="scss" scoped>
.dx-menu-lists {
  position: absolute;
  top: 160px;
  left: 2px;
  min-height: 100px;
  max-height: calc(100vh - 200px);
  width: 430px;
  z-index: 100000;
  background-color: rgba(24, 116, 205, 0.18);
  box-sizing: border-box;
  box-shadow: 0 0 6px #00b2ee, 0 0 2px #009acd inset;
  background-image: url("../../assets/homeImg/cc.png");
  background-size: 100% 100%;
  padding: 0 10px;
  overflow: hidden;
  box-sizing: border-box;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  border-radius: 6px;
  border: 1px solid #299dc8;
  // .menu-lists-header {

  // }
  .menu-lists-body {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    & > div {
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      width: 64px;
      height: 70px;
      // border: 1px solid red;
      margin: 8px;
      padding: 5px;
      .tools-icon {
        width: 40px;
        height: 40px;
        margin: 0 auto;
        overflow: hidden;
        text-align: center;
        border: 1px solid transparent;
        border-radius: 50%;
        box-sizing: border-box;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 16px;
        i {
          transition: all 0.6s;
          transform: scale(1);
        }
      }
      & > span {
        margin-top: 4px;
        font-size: 12px;
      }
    }
    & > div:hover {
      box-shadow: 0 0 4px #fff, 0 0 2px #fff inset;
      border-radius: 4px;
      .tools-icon {
        i {
          transform: scale(1.4);
        }
      }
    }
  }
}
</style>
